\(\int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx\) [339]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (warning: unable to verify)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F(-1)]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 236 \[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}+\frac {(4 a-7 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{4 (a-b)^{5/2} d}+\frac {(4 a+7 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{4 (a+b)^{5/2} d}+\frac {2 b^4}{a \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}+\frac {\sqrt {a+b \sec (c+d x)}}{4 (a+b)^2 d (1-\sec (c+d x))}+\frac {\sqrt {a+b \sec (c+d x)}}{4 (a-b)^2 d (1+\sec (c+d x))} \]

[Out]

-2*arctanh((a+b*sec(d*x+c))^(1/2)/a^(1/2))/a^(3/2)/d+1/4*(4*a-7*b)*arctanh((a+b*sec(d*x+c))^(1/2)/(a-b)^(1/2))
/(a-b)^(5/2)/d+1/4*(4*a+7*b)*arctanh((a+b*sec(d*x+c))^(1/2)/(a+b)^(1/2))/(a+b)^(5/2)/d+2*b^4/a/(a^2-b^2)^2/d/(
a+b*sec(d*x+c))^(1/2)+1/4*(a+b*sec(d*x+c))^(1/2)/(a+b)^2/d/(1-sec(d*x+c))+1/4*(a+b*sec(d*x+c))^(1/2)/(a-b)^2/d
/(1+sec(d*x+c))

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 316, normalized size of antiderivative = 1.34, number of steps used = 11, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3970, 912, 1349, 212, 205} \[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}+\frac {2 b^4}{a d \left (a^2-b^2\right )^2 \sqrt {a+b \sec (c+d x)}}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{4 d (a-b)^{5/2}}+\frac {b \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{4 d (a+b)^{5/2}}+\frac {(2 a-3 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{2 d (a-b)^{5/2}}+\frac {(2 a+3 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{2 d (a+b)^{5/2}}+\frac {\sqrt {a+b \sec (c+d x)}}{4 d (a+b)^2 (1-\sec (c+d x))}+\frac {\sqrt {a+b \sec (c+d x)}}{4 d (a-b)^2 (\sec (c+d x)+1)} \]

[In]

Int[Cot[c + d*x]^3/(a + b*Sec[c + d*x])^(3/2),x]

[Out]

(-2*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a]])/(a^(3/2)*d) + ((2*a - 3*b)*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqr
t[a - b]])/(2*(a - b)^(5/2)*d) - (b*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a - b]])/(4*(a - b)^(5/2)*d) + (b*Ar
cTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a + b]])/(4*(a + b)^(5/2)*d) + ((2*a + 3*b)*ArcTanh[Sqrt[a + b*Sec[c + d*x
]]/Sqrt[a + b]])/(2*(a + b)^(5/2)*d) + (2*b^4)/(a*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + Sqrt[a + b*Sec[c
 + d*x]]/(4*(a + b)^2*d*(1 - Sec[c + d*x])) + Sqrt[a + b*Sec[c + d*x]]/(4*(a - b)^2*d*(1 + Sec[c + d*x]))

Rule 205

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 912

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> With[{q = De
nominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + g*(x^q/e))^n*((c*d^2 + a*e^2)/e^2 - 2*c*
d*(x^q/e^2) + c*(x^(2*q)/e^2))^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*
g, 0] && NeQ[c*d^2 + a*e^2, 0] && IntegersQ[n, p] && FractionQ[m]

Rule 1349

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, p, q}, x]
 && NeQ[b^2 - 4*a*c, 0] && (IGtQ[p, 0] || IGtQ[q, 0] || IntegersQ[m, q])

Rule 3970

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[-(-1)^((m - 1
)/2)/(d*b^(m - 1)), Subst[Int[(b^2 - x^2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b
, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {b^4 \text {Subst}\left (\int \frac {1}{x (a+x)^{3/2} \left (b^2-x^2\right )^2} \, dx,x,b \sec (c+d x)\right )}{d} \\ & = \frac {\left (2 b^4\right ) \text {Subst}\left (\int \frac {1}{x^2 \left (-a+x^2\right ) \left (-a^2+b^2+2 a x^2-x^4\right )^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{d} \\ & = \frac {\left (2 b^4\right ) \text {Subst}\left (\int \left (-\frac {1}{a (a-b)^2 (a+b)^2 x^2}-\frac {1}{a b^4 \left (a-x^2\right )}-\frac {1}{4 (a-b) b^3 \left (a-b-x^2\right )^2}+\frac {2 a-3 b}{4 (a-b)^2 b^4 \left (a-b-x^2\right )}+\frac {1}{4 b^3 (a+b) \left (a+b-x^2\right )^2}+\frac {2 a+3 b}{4 b^4 (a+b)^2 \left (a+b-x^2\right )}\right ) \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{d} \\ & = \frac {2 b^4}{a \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}-\frac {2 \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{a d}+\frac {(2 a-3 b) \text {Subst}\left (\int \frac {1}{a-b-x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{2 (a-b)^2 d}-\frac {b \text {Subst}\left (\int \frac {1}{\left (a-b-x^2\right )^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{2 (a-b) d}+\frac {b \text {Subst}\left (\int \frac {1}{\left (a+b-x^2\right )^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{2 (a+b) d}+\frac {(2 a+3 b) \text {Subst}\left (\int \frac {1}{a+b-x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{2 (a+b)^2 d} \\ & = -\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}+\frac {(2 a-3 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{2 (a-b)^{5/2} d}+\frac {(2 a+3 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{2 (a+b)^{5/2} d}+\frac {2 b^4}{a \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}+\frac {\sqrt {a+b \sec (c+d x)}}{4 (a+b)^2 d (1-\sec (c+d x))}+\frac {\sqrt {a+b \sec (c+d x)}}{4 (a-b)^2 d (1+\sec (c+d x))}-\frac {b \text {Subst}\left (\int \frac {1}{a-b-x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{4 (a-b)^2 d}+\frac {b \text {Subst}\left (\int \frac {1}{a+b-x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{4 (a+b)^2 d} \\ & = -\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}+\frac {(2 a-3 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{2 (a-b)^{5/2} d}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{4 (a-b)^{5/2} d}+\frac {b \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{4 (a+b)^{5/2} d}+\frac {(2 a+3 b) \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{2 (a+b)^{5/2} d}+\frac {2 b^4}{a \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}+\frac {\sqrt {a+b \sec (c+d x)}}{4 (a+b)^2 d (1-\sec (c+d x))}+\frac {\sqrt {a+b \sec (c+d x)}}{4 (a-b)^2 d (1+\sec (c+d x))} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 1.09 (sec) , antiderivative size = 315, normalized size of antiderivative = 1.33 \[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=\frac {-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}+\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-\frac {2 a \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\frac {a+b \sec (c+d x)}{a-b}\right )}{(a-b) \sqrt {a+b \sec (c+d x)}}+\frac {2 a \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\frac {a+b \sec (c+d x)}{a+b}\right )}{(a+b) \sqrt {a+b \sec (c+d x)}}+\frac {4 b \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},1+\frac {b \sec (c+d x)}{a}\right )}{a \sqrt {a+b \sec (c+d x)}}+\frac {b^2 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},2,\frac {1}{2},\frac {a+b \sec (c+d x)}{a-b}\right )}{(a-b)^2 \sqrt {a+b \sec (c+d x)}}-\frac {b^2 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},2,\frac {1}{2},\frac {a+b \sec (c+d x)}{a+b}\right )}{(a+b)^2 \sqrt {a+b \sec (c+d x)}}}{2 b d} \]

[In]

Integrate[Cot[c + d*x]^3/(a + b*Sec[c + d*x])^(3/2),x]

[Out]

((-2*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a - b]])/Sqrt[a - b] + (2*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a +
 b]])/Sqrt[a + b] - (2*a*Hypergeometric2F1[-1/2, 1, 1/2, (a + b*Sec[c + d*x])/(a - b)])/((a - b)*Sqrt[a + b*Se
c[c + d*x]]) + (2*a*Hypergeometric2F1[-1/2, 1, 1/2, (a + b*Sec[c + d*x])/(a + b)])/((a + b)*Sqrt[a + b*Sec[c +
 d*x]]) + (4*b*Hypergeometric2F1[-1/2, 1, 1/2, 1 + (b*Sec[c + d*x])/a])/(a*Sqrt[a + b*Sec[c + d*x]]) + (b^2*Hy
pergeometric2F1[-1/2, 2, 1/2, (a + b*Sec[c + d*x])/(a - b)])/((a - b)^2*Sqrt[a + b*Sec[c + d*x]]) - (b^2*Hyper
geometric2F1[-1/2, 2, 1/2, (a + b*Sec[c + d*x])/(a + b)])/((a + b)^2*Sqrt[a + b*Sec[c + d*x]]))/(2*b*d)

Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(6366\) vs. \(2(204)=408\).

Time = 2.34 (sec) , antiderivative size = 6367, normalized size of antiderivative = 26.98

method result size
default \(\text {Expression too large to display}\) \(6367\)

[In]

int(cot(d*x+c)^3/(a+b*sec(d*x+c))^(3/2),x,method=_RETURNVERBOSE)

[Out]

result too large to display

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 936 vs. \(2 (202) = 404\).

Time = 48.26 (sec) , antiderivative size = 8098, normalized size of antiderivative = 34.31 \[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=\text {Too large to display} \]

[In]

integrate(cot(d*x+c)^3/(a+b*sec(d*x+c))^(3/2),x, algorithm="fricas")

[Out]

Too large to include

Sympy [F]

\[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=\int \frac {\cot ^{3}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx \]

[In]

integrate(cot(d*x+c)**3/(a+b*sec(d*x+c))**(3/2),x)

[Out]

Integral(cot(c + d*x)**3/(a + b*sec(c + d*x))**(3/2), x)

Maxima [F(-1)]

Timed out. \[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=\text {Timed out} \]

[In]

integrate(cot(d*x+c)^3/(a+b*sec(d*x+c))^(3/2),x, algorithm="maxima")

[Out]

Timed out

Giac [F(-2)]

Exception generated. \[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(cot(d*x+c)^3/(a+b*sec(d*x+c))^(3/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Unable to divide, perhaps due to rounding error%%%{%%%{32,[2,6]%%%}+%%%{-32,[1,7]%%%},[6,1]%%%}+%%%{%%{[%%%
{64,[2,6]%%

Mupad [F(-1)]

Timed out. \[ \int \frac {\cot ^3(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx=\int \frac {{\mathrm {cot}\left (c+d\,x\right )}^3}{{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]

[In]

int(cot(c + d*x)^3/(a + b/cos(c + d*x))^(3/2),x)

[Out]

int(cot(c + d*x)^3/(a + b/cos(c + d*x))^(3/2), x)